import 'package:flutter/material.dart';
import 'package:flutter_base_app/config/theme.dart';

class ColorsApp {
  ColorsApp._();

  static const primaryColor = Color(0xFFDD2526);
  static const primaryColorDark = Color(0xFFDD2526);

  static const load_and_retry_circle_color = primaryColor;
  static const load_and_retry_load_title_color = Color(0xff666666);
  static const load_and_retry_button_strokecolor = Color(0xff666666);

  static const page_background = Color(0xfff9fafb);
  static const page_background_dark = Color(0xff1e1f28);

  static const color_ececec = Color(0xffefefef);
  static const color_1E1E1E = Color(0xff1E1E1E);
  static const red = Colors.red;
  static const white = Colors.white;
  static const black = Colors.black;
  static const black_1f212b = Color(0xff1f212b);

  static const black_20 = Color(0xff202020);
  static const black_22 = Color(0xff222430);
  static const black_26 = Color(0xff262836);
  static const black_31 = Color(0xff313131);
  static const black_33 = Color(0xff333333);
  static const black_3C = Color(0xff3C3C3C);
  static const black_38 = Color(0xff383838);
  static const black_40 = Color(0xff404040);
  static const black_44 = Color(0xff444444);

  static const FFDFBE84 = Color(0xFFDFBE84);
  static const gray_e5 = Color(0xFFE5E5E5);
  static const gray_ec = Color(0xFFECECEC);
  static const gray_66 = Color(0xFF666666);
  static const gray_7A = Color(0xFF7A7A7A);
  static const gray_8c = Color(0xFF8c8c8c);
  static const gray_99 = Color(0xFF999999);
  static const gray_97 = Color(0xFF979797);
  static const gray_95 = Color(0xFF959595);
  static const gray_92 = Color(0xFF929292);
  static const gray_aa = Color(0xFFAAAAAA);
  static const gray_cc = Color(0xFFCCCCCC);
  static const gray_ee = Color(0xFFEEEEEE);
  static const gray_f9 = Color(0xFFF9F9F9);
  static const gray_d9 = Color(0xFFD9D9D9);
  static const dividerColor = Color(0xFFCCCCCC);

  static const Color bleColorHealthy = Color(0xFF4CD964);
  static const Color bleColorWarning = Color(0xFFFFD30F);
  static const Color bleColorError = Color(0xFFFF0000);
  static const Color bleColorOffline = Color(0xFFFF0000);
  static const Color bleColorEco = Color(0xFF4CD964);
  static const Color bleColorEcoPlus = Color(0xFF32F9CE);
  static const Color bleColorTour = Color(0xFF00E4FF);
  static const Color bleColorTourPlus = Color(0xFFFF9900);
  static const Color bleColorBoost = Color(0xFFDD2526);
  static const Color bleBlack = Color(0xFF000000);
  static const Color color_00B578 = Color(0xFF00B578);
  static const Color color_dd2526 = Color(0xFFDD2526);
  static const Color color_4CD964 = Color(0xFF4CD964);
  static const Color color_CCD9E0 = Color(0xFFccd9e0);
  static const Color color_4576EC = Color(0xFF4576EC);
  static const Color color_FF7C02 = Color(0xFFFF7C02);
  static const Color color_32F9CE = Color(0xFF32F9CE);
  static const Color color_00E4FF = Color(0xFF00E4FF);
  static const Color color_FF9900 = Color(0xFFFF9900);

  static const dialogDarkBg = black_1f212b;
  static const dialogLightBg = white;
}

extension ColorExe on Color {
  ColorFilter toColorFilter([BlendMode mode = BlendMode.srcIn]) {
    return ColorFilter.mode(this, mode);
  }
}

//主题对应颜色
class ColorsTheme {
  ColorsTheme._();

  static bool get isDark => ThemeUtils.isDark;
  static bool get isLight => !ThemeUtils.isDark;

  static Color get test => isLight ? ColorsApp.white : ColorsApp.black_3C;
}